<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>hover加效果</title>
    <style>
        #box{
            width: 10vw;
            height: 10vw;
            background-color:pink;
            position:relative;
        }
        #box::after{
            content: '';
            height: 10px;
            background-color: cyan;
            position:absolute;
            bottom: 0;
            width: 0;
            left: 50%;
            transform: translate(-50%);
            /*animation-name: goBack;*/
            /*animation-duration:.5s;*/
        }
        #box:hover:after{
            width: 100%;
            animation-name: ani;
            animation-timing-function:linear;
            animation-duration:.5s;
            animation-fill-mode: forwards; /*动画停在最后100%时候的状态*/
            animation-direction:alternate;
            /*transition: all linear .5s;*/
        }
        @keyframes goBack {
            from{
                width: 100%;
            }
            to{
                width: 0;
            }
        }
        @keyframes ani{
            from{
                width: 0;
            }
            to{
                width: 100%;
            }
        }
    </style>
</head>
<body>
    <div id="box">
<!--        <div class="border"></div>-->
    </div>

    <script>
        console.log(Object.prototype.toString.call([]))
        console.log(Array.isArray([]))
        console.log([].constructor === Array)
    </script>
</body>
</html>
